<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%--使用taglib 引入标签库--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="renderer" content="webkit">
  <title></title>
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/pintuer.css">
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/admin.css">
  <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
  <script src="<%=request.getContextPath()%>/js/pintuer.js"></script>
</head>
<body>
<form method="post" action="list" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 请假单列表</strong>
    <div class="padding border-bottom">
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th >请假编号</th>
        <th >课程编号</th>
        <th>请假时间</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
      <%--使用JSTL标签库的迭代标签输出userlist集合的元素--%>
      <c:forEach var="item" items="${requestScope.leave}" >

        <tr>
          <td>${item.leaveID}</td>
          <td>${item.courseID}</td>
          <td>${item.applytime}</td>
          <td><c:choose>
            <c:when test="${item.status==1}">
              <span style="color: #00aa00">同意</span>
            </c:when>
            <c:when test="${item.status==2}">
              <span style="color: red">不同意</span>
            </c:when>
            <c:otherwise>
              待审核
            </c:otherwise>
          </c:choose>
          </td>

          <td><div class="button-group">
                <a class="button border-main" href="LeaveServlet?id=${item.leaveID}&action=editInfo"><span class="icon-edit"></span> 预览</a>
          </div></td>
        </tr>
      </c:forEach>
    </table>
      </div>
    </div>
</form>
<script type="text/javascript">
  function changeSearch(){
    $("#listform").submit();
  }
</script>
</body>
</html>